Skip to content

Preserve base identity in direct installs - #21

Open
omry wants to merge 1 commit into
pr19from
pr21
Open

Preserve base identity in direct installs#21
omry wants to merge 1 commit into
pr19from
pr21

Conversation

@omry
omry changed the base branch from main to pr19 August 3, 2026 13:21
@omry
omry marked this pull request as ready for review August 3, 2026 13:21
Copilot AI review requested due to automatic review settings August 3, 2026 13:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a base-only provider-graph validation edge case where inspecting a base image by config ID can yield an internally inconsistent identity (Docker-reported config-ID descriptor vs the originally resolved registry descriptor). The change restores the resolved base descriptor/image identity so downstream validation and application runtime-layer builds remain consistent when no provider layers are present.

Changes:

  • In base-only graphs, restore the resolved base Descriptor and base prefix Image after inspection to preserve the registry-resolved identity.
  • Relax inspected-candidate identity validation to accept Image.Digest matching either the descriptor’s config digest or (when present) manifest digest.
  • Update the base-only graph validation test to simulate Docker’s config-ID inspection behavior and assert the resolved descriptor is preserved; add a changelog fragment.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
internal/dockerdeploy/provider_graph_validation.go Restores the resolved base descriptor/image identity for base-only graphs after inspection-by-config-ID.
internal/dockerdeploy/provider_graph_validation_test.go Updates the base-only test to reflect Docker’s config-ID descriptor reporting and asserts the resolved descriptor is preserved.
internal/dockerdeploy/materialization_layer.go Allows inspected identity validation to accept manifest digest matches when a descriptor carries a manifest digest.
.changes/unreleased/+base-only-direct-install.yaml Adds a release-note fragment documenting the fix.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@omry
omry force-pushed the pr21 branch 2 times, most recently from db242f2 to 90b9c39 Compare August 5, 2026 21:15
@omry
omry force-pushed the pr21 branch 2 times, most recently from 71e2370 to fa3306d Compare August 5, 2026 21:40
@omry
omry force-pushed the pr21 branch 2 times, most recently from d5d3a5f to fc8b283 Compare August 5, 2026 22:01
@omry
omry force-pushed the pr21 branch 2 times, most recently from 2a5e37c to 59ee228 Compare August 6, 2026 05:39
@omry

omry commented Aug 8, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1d717aff70

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

// identity so the inspected candidate remains internally consistent and
// the application runtime layer connects to the graph's base prefix.
candidate.Descriptor = base
candidate.Image = graph.PrefixImages[0]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Normalize registry identity before install-time account rebuild

For a registry-backed base-only graph, this makes RuntimeLayer.Upstream.Digest the manifest digest. If installation changes the local account—most notably a Linux system-scope install from the temporary staged build—buildInstalledRuntimeIdentityWithV1 reinspects that upstream by config ID; InspectBuiltImageCandidate reports Digest == ConfigDigest, so the strict comparison in install_runtime_identity.go:58-67 rejects the unchanged image before rebuilding the runtime identity. Normalize that reinspection back to the locked base identity and descriptor so these installs do not fail.

Useful? React with 👍 / 👎.

@omry

omry commented Aug 8, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: bbc413dd92

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved PR reviewed and approved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants